package com.cl.unipay4j.demo.example;

/**
 * @Author: kfc
 * @Description: <br/>
 * Date:Create in 2019/5/29 13:53
 * @Modified By:
 */
public enum ResultCodeEnum {


    /**
     * 请求成功
     */
    SUCCESS(200,"请求成功"),
    /**
     * 请求失败
     */
    ERROR(400,"请求失败"),
    /**
     * 用户未登陆
     */
    UNAUTHORIZED(401,"用户未登陆"),
    /**
     * 用户名不存在或者密码错误
     */
    AUTHORIZED_FAIL(401,"用户名不存在或者密码错误"),
    /**
     * 无访问权限
     */
    ACCESS_DENIED(403,"无访问权限"),
    /**
     * 请求资源不存在
     */
    NOT_FOUND(404,"请求资源不存在"),
    /**
     * 服务器内部异常
     */
    EXCEPTION(500,"服务器内部异常"),
    /**
     * 服务暂时不可用
     */
    GATEWAY_TIMEOUT(504,"服务暂时不可用"),
    ;

    private int code;
    private String msg;

    ResultCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
